﻿using DataCenter.Service.Interfaces;
using Microsoft.AspNetCore.Mvc;

namespace DataCenter.App.Controllers
{
    [ApiController]
    [Route("api/[controller]")]
    public class ProductController : ControllerBase
    {
        private readonly IProductService productservice;
        public ProductController(IProductService service)
        {
            productservice=service;
        }
        [HttpGet(nameof(GetAll))]
        public async Task <IActionResult> GetAll()
        {
           var datas=await productservice.GetAll();
            return Ok(datas);   
        }
    }
}
